package com.tvein.sanguo.event.model
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.IProxy;
	import org.puremvc.as3.multicore.patterns.proxy.Proxy;
	//custom
//
	public class SystemProxy extends Proxy implements IProxy
	{
		public static const NAME:String = "SystemProxy";
		
		public function SystemProxy()
		{
			super(NAME);
		}
		
		//Custom
		private var _config:Array = new Array();
		
		//Role
		private var _roleID:int;
		//Room
		private var _roomName:String;
		//Server
		private var _srcServer:String;
		//Sound
		private var _effectVol:Number;
		//Event
		private var _eventFreeze:Boolean = true;
		private var _eventScript:Array = new Array();
		private var _curEvent:String = "";
		private var _curProcess:int = 0;
		
		override public function onRegister() : void
        {
			_effectVol = 100;
			_config["effectVol"] = 100;
        }
		
		public function get config() : Array
		{
			return _config;
		}
		
		public function set srcServer(value:String) : void
		{
			_srcServer = value;
			_config["srcServer"] = value;
		}
		
		public function get srcServer() : String
		{
			return _srcServer;
		}
		
		public function set effectVol(value:Number) : void
		{
			_effectVol = value;
			_config["effectVol"] = value;
		}
		
		public function get effectVol() : Number
		{
			return _effectVol;
		}
		
		public function set roleID(value:int) : void
		{
			_roleID = value;
			_config["roleID"] = value;
		}
		
		public function get roleID() : int
		{
			return _roleID;
		}
		
		public function set roomName(value:String) : void
		{
			_roomName = value;
			_config["roomName"] = value;
		}
		
		public function get roomName() : String
		{
			return _roomName;
		}
		
		//
		
		public function set eventFreeze(value:Boolean) : void
		{
			_eventFreeze = value;
		}
		
		public function get eventFreeze() : Boolean
		{
			return _eventFreeze;
		}
		
		public function addScript(value:Object) : void
		{
			_eventScript.push(value);
		}
		
		public function getScript() : Array
		{
			return _eventScript;
		}
		
		public function set curEvent(value:String) : void
		{
			_curEvent = value;
		}
		
		public function get curEvent() : String
		{
			return _curEvent;
		}
		
		public function set curProcess(value:int) : void
		{
			_curProcess = value;
		}
		
		public function get curProcess() : int
		{
			return _curProcess;
		}
	}
}